package com.lmf.eduservice.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lmf.eduservice.entity.EduCourse;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lmf.eduservice.entity.frontVo.CourseFrontVo;
import com.lmf.eduservice.entity.vo.CourseInfoForm;
import com.lmf.eduservice.entity.vo.CoursePublishVo;
import com.lmf.handler.Exception.LmfException;

import java.util.Map;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author lmf
 * @since 2022-01-25
 */
public interface EduCourseService extends IService<EduCourse> {

    //保存添加的课程相关信息
    String saveCourseInfo(CourseInfoForm courseInfoForm) throws LmfException;

    CourseInfoForm getCourseInfo(String courseId);

    void updateCourseInfo(CourseInfoForm courseInfoForm) throws LmfException;

//    根据课程id查询课程确认信息
    CoursePublishVo getPublishCourseInfo(String courseId);

    boolean deleteCourseById(String courseId) throws LmfException;

    Map<String, Object> getCourseFrontInfo(Page<EduCourse> page, CourseFrontVo courseFrontVo);
}
